package com.lu.statistics.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lu.statistics.entity.RCustomer;

import java.text.ParseException;
import java.util.Date;
import java.util.List;


/**
 * 客户管理Service
 */
public interface RCustomerService extends IService<RCustomer> {
    /**
     * 添加或修改客户信息
     *
     * @param customer
     * @return
     */
    void saveOrUpdateCustomer(RCustomer customer);


    /**
     * 查询客户列表信息
     *
     * @param customer
     * @param current
     * @param pageSize
     * @return
     */
    public IPage<RCustomer> queryPageCustomerList(RCustomer customer, int current, int pageSize);

    /**
     * 查询订单客户列表
     *
     * @param status
     * @return
     */
    public List<RCustomer> queryOrderCustomerList(String status);

    /**
     * 根据ID查询客户列表信息
     *
     * @param createId
     * @return
     */

    public RCustomer queryCustomerInfo(int createId);


    /**
     * 验证客户电话是否存在
     *
     * @param phone
     * @return
     */
    public boolean validateCustomerPhoneExists(String phone);

    /**
     * 获取结束时间
     *
     * @param startTime
     * @param mealDuration
     * @param bookingRoom
     * @return
     */
    public Date queryEndTime(Date startTime, Integer mealDuration, String bookingRoom,Integer customerId) throws ParseException;

    /**
     * 更新客户状态
     * @param id
     * @param status
     */
    public void updateCustomerStatus(Integer id,String status);
    /**
     * 删除客户信息
     *
     * @param id
     * @return
     */
    public void deleteCustomer(int id);
}
